package Log;

import GUI.LogGUI;

public class Log {
	public static Log log =null;
	static LogGUI Logger;
	private Log(){
		Logger = new LogGUI();
		
	}
	public static Log getInstance(){
		if (null == log)
			log = new Log();
		
		return log;

	}
	static public void addError(String msg){
		if (null == log)
			 getInstance();
		ShowLogWindow();
		Logger.add2Log(msg);
	}
	
	static public void ShowLogWindow(){
		if (Logger.getWindowStatus()==false)
			Logger.setVisible(true);
	}
	static public void CloseLogWindow(){
		Logger.CloseWindow();
	}
	
}
